/*
 * i2c_drvier.h
 *
 */

#ifndef SRC_I2C_DRVIER_H_
#define SRC_I2C_DRVIER_H_


#include "xparameters.h"
#include "xiic.h"
// #include "xintc.h"
#include "xil_exception.h"
#include "xil_printf.h"
#include "xstatus.h"


#define IIC_DEVICE_ID		XPAR_IIC_0_DEVICE_ID
#define INTC_DEVICE_ID		XPAR_INTC_0_DEVICE_ID
#define INTC_IIC_INTERRUPT_ID	XPAR_INTC_0_IIC_0_VEC_ID

#include "xiic_l.h"
#define IIC_BASE_ADDRESS	XPAR_IIC_0_BASEADDR


#define SENSOR_7417_ADDRESS	0x28



int IIC_axi_initialize(u16 DeviceId);

double get_board_temper();
double get_bb_voltage();
double get_bb_current();


#endif /* SRC_I2C_DRVIER_H_ */